/**
 * 
 */
package com.gopay.common.domain.cps.vo;

import java.util.Date;

import com.gopay.common.domain.BaseEntity;
import com.gopay.common.domain.cps.CpsBtContractInfo;
import com.gopay.common.domain.cps.CpsBtContractLog;

/**
 * 大宗签约解约Vo
 * 
 * @CpsBtContractVo.java
 * @author xiefei
 * @2013-1-22 上午11:47:28 www.gopay.com.cn Inc.All rights reserved.
 */
public class CpsBtContractVo extends BaseEntity {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    /**
     * 日志流水号
     */
    private int logSq;

    /**
     * 网关交易流水号
     */
    private int pgTransDtlSq;

    /**
     * 协议号
     */
    private String contractId;

    /**
     * 协议类型01 - 签约02 - 解约
     */
    private String contractType;

    /**
     * 发起时间
     */
    private Date launchTime;

    /**
     * 创建时间
     */
    private Date createdTs;

    /**
     * 记录最后修改时间
     */
    private Date lastUpdTs;

    /**
     * 最后修改交易码
     */
    private String lastUpdTrancode;

    /**
     * 交易市场客户ID
     */
    private String marketCustId;

    /**
     * 交易市场监管账号
     */
    private String marketAcct;

    /**
     * 交易会员客户ID
     */
    private String memberCustId;

    /**
     * 交易会员账号
     */
    private String memberAcct;

    /**
     * 交易会员账户类型1 - 个人 2 - 企业
     */
    private String memberAcctType;

    public String getMarketCustId() {
        return marketCustId;
    }

    public void setMarketCustId(String marketCustId) {
        this.marketCustId = marketCustId;
    }

    public String getMarketAcct() {
        return marketAcct;
    }

    public void setMarketAcct(String marketAcct) {
        this.marketAcct = marketAcct;
    }

    public String getMemberCustId() {
        return memberCustId;
    }

    public void setMemberCustId(String memberCustId) {
        this.memberCustId = memberCustId;
    }

    public String getMemberAcct() {
        return memberAcct;
    }

    public void setMemberAcct(String memberAcct) {
        this.memberAcct = memberAcct;
    }

    public String getMemberAcctType() {
        return memberAcctType;
    }

    public void setMemberAcctType(String memberAcctType) {
        this.memberAcctType = memberAcctType;
    }

    public int getLogSq() {
        return logSq;
    }

    public void setLogSq(int logSq) {
        this.logSq = logSq;
    }

    public int getPgTransDtlSq() {
        return pgTransDtlSq;
    }

    public void setPgTransDtlSq(int pgTransDtlSq) {
        this.pgTransDtlSq = pgTransDtlSq;
    }

    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    public String getContractType() {
        return contractType;
    }

    public void setContractType(String contractType) {
        this.contractType = contractType;
    }

    public Date getLaunchTime() {
        return launchTime;
    }

    public void setLaunchTime(Date launchTime) {
        this.launchTime = launchTime;
    }

    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    public String getLastUpdTrancode() {
        return lastUpdTrancode;
    }

    public void setLastUpdTrancode(String lastUpdTrancode) {
        this.lastUpdTrancode = lastUpdTrancode;
    }
    
    public CpsBtContractVo() {
    }

    public CpsBtContractVo(String marketCustId, String marketAcct, String memberCustId, String memberAcct,
            String memberAcctType) {
        this.marketCustId = marketCustId;
        this.marketAcct = marketAcct;
        this.memberCustId = memberCustId;
        this.memberAcct = memberAcct;
        this.memberAcctType = memberAcctType;
    }

    public CpsBtContractVo(CpsBtContractLog contractLog, CpsBtContractInfo contractInfo) {
        setLogSq(contractLog.getLogSq());
        setPgTransDtlSq(contractLog.getPgTransDtlSq());
        setContractId(contractLog.getContractId());
        setContractType(contractLog.getContractType());
        setCreatedTs(contractLog.getCreatedTs());
        setLastUpdTrancode(contractLog.getLastUpdTrancode());
        setLastUpdTs(contractLog.getLastUpdTs());
        setLaunchTime(contractLog.getLaunchTime());

        this.marketAcct = contractInfo.getMarketAcct();
        this.marketCustId = contractInfo.getMarketCustId();
        this.memberAcct = contractInfo.getMemberAcct();
        this.memberAcctType = String.valueOf(contractInfo.getMemberAcctType());
        this.memberCustId = contractInfo.getMemberCustId();
    }

}
